package com.project.service;

import java.math.BigInteger;
import java.util.List;

import com.project.vo.Admin;
import com.project.vo.User;

public interface UserService {

	
	/**
	 * login by username
	 * @param username
	 * @param password
	 * @return
	 */
	public User login(Integer userId, String password);
	public Admin login_A(Integer id, String password);
	/**
	 * forget and find password
	 * @param username
	 * @param password
	 * @return
	 */
	public String findPassword(Integer userId, String password);

	/**
	 * register user's personal info
	 * @param user
	 * @return
	 */
	public String register(User user);

	/**
	 * update user's personal info
	 * @param oldName
	 * @param user
	 * @return
	 */
	public String update(Integer userId, User user);

	/**
	 * view personal info
	 * @param name
	 * @return
	 */
	public User view(Integer userId);
	public Admin view_A(Integer id);
	/**
	 * save validation code
	 * @param email
	 * @param code
	 * @return
	 */
	public String saveCode(String email, String code);

	/**
	 * get code by email
	 * @param email
	 * @return
	 */
	public String getCode(String email);
	
	/**
	 * get all users
	 * @return
	 */
	public List<User> getAllUser(Integer pageNum, Integer pageSize);
	public List<User> getAllUser();
	/**
	 * delete user
	 * @param id
	 * @return
	 */
	public String delete(Integer id);
}
